From 1743e18c8765ee6679f907802c7a9016afd52e31 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 9 Jun 2011 20:40:45 -0400 Subject: [PATCH] GtkDialog: avoid underallocations GtkDialog changes its size depending on style properties. If we only do this in response to ::style-updated, it happens during the initial realization of the dialog and leads to the dialog 'growing' between when we determine the initial window size and when we allocate it that size. So, do this beforehand. --- gtk/gtkdialog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 6aae900303..931ac617fe 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -349,6 +349,7 @@ update_spacings (GtkDialog *dialog) "action-area-border", &action_area_border, NULL); + gtk_container_set_border_width (GTK_CONTAINER (priv->vbox), content_area_border); if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox))) @@ -397,6 +398,8 @@ gtk_dialog_init (GtkDialog *dialog) gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT); + + update_spacings (dialog); } static GtkBuildableIface *parent_buildable_iface; -- 2.30.2